import Vue from 'vue'
import App from './App'
import ElementUI from 'element-ui'
import 'assets/less/common.less'
import 'element-ui/lib/theme-default/index.css'
import { sync } from 'vuex-router-sync'
import store from 'store'
import router from 'router'
import * as filters from 'src/filter/filter.js'
import * as goodsOperta from 'src/plugin/goods.js'
import VueDND from 'awe-dnd'

sync(store, router)
Vue.use(VueDND)
Vue.use(ElementUI)
Vue.use(goodsOperta)
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

const app = new Vue({
  el: '#app',
  router,
  store,
  ...App
})

export { app, router, store }
